package com.data.center.service;
import com.data.center.dto.PersonDto;
import com.data.center.entity.Person;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

public interface PersonService {

    Person getPersonById(String personId);

    List<Person> getAllPersons();

    List<PersonDto> findPerson(PersonDto person);

    PersonDto addPerson(PersonDto person);

    PersonDto forceAddPerson(PersonDto person);

    PersonDto updatePerson(PersonDto originalPerson, PersonDto newPerson);

    boolean logicalDelete(String id);

    boolean physicalDelete(String id) throws InvocationTargetException, IllegalAccessException;

    PersonDto merge(PersonDto personDto, PersonDto deletedPerson) throws InvocationTargetException, IllegalAccessException;

    void updatePerson(Person person);

    void deletePerson(String personId);

    List<Person> searchByAffiliation(String id);

    int deleteByAffiliation(String id);

    int mergeByAffiliation(String id, String deletedId);

    List<Person> searchByGraduation(String id);

    int deleteByGraduation(String id);

    int mergeByGraduation(String id, String deletedId);
}
